
Product
Introducing Socket Firewall Enterprise: Flexible, Configurable Protection for Modern Package Ecosystems
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.
parallax-controller
Advanced tools
[](https://badge.fury.io/js/parallax-controller) [](https://codecov.io/gh/jscottsmith/parallax-c
Core classes and controller for creating parallax scrolling effects.
This package was created for react-scroll-parallax, but can be used as a standalone lib.
Create the parallax controller first:
const controller = ParallaxController.init();
Then create an element with animation effects as props:
controller.createElement({
elOuter: document.getElementById('outer'),
elInner: document.getElementById('inner'),
props: {
translateY: [-100, 100],
opacity: [0.4, 1],
},
});
<div id="outer">
<div id="inner">
<!-- children -->
</div>
</div>
A number of techniques are used to keep scrolling optimized:
getBoundingClientRect()) are cached and only updated when layout may change.requestAnimationFrame is used to apply all scroll effects.transform and opacity are allowed.will-change is added to an element based on animation effects to prevent paints.If you have ideas to further optimize scrolling please PR or post an issue.
It's up to you to make sure you use this package appropriately. Here's some suggestions for usage while maintaining good UX:
FAQs
Core classes and controller for creating parallax scrolling effects
The npm package parallax-controller receives a total of 25,635 weekly downloads. As such, parallax-controller popularity was classified as popular.
We found that parallax-controller demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.

Security News
Open source dashboard CNAPulse tracks CVE Numbering Authorities’ publishing activity, highlighting trends and transparency across the CVE ecosystem.

Product
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.